<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <TodayRecommend></TodayRecommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="f in floorList" :key="f.id" :floorListObj="f"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from './ListContainer/ListContainer'
import Brand from './Brand/Brand'
import Floor from './Floor/Floor'
import Like from './Like/Like'
import Rank from './Rank/Rank'
import TodayRecommend from './TodayRecommend/TodayRecommend'

import { mapState } from 'vuex'
export default {
  name: 'Home',
  components: {
    ListContainer,
    Brand,
    Like,
    Rank,
    TodayRecommend,
    Floor,
  },
  mounted() {
    this.$store.dispatch('homeStore/getFloorList')
    // 获取用户信息在首页展示
    this.$store.dispatch('registerStore/getUserInfoByToken')
  },
  computed: {
    ...mapState('homeStore', ['floorList']),
  },
}
</script>

<style>
</style>